<script lang="ts" setup>

import { reactive  } from "vue";
const state=reactive({name:'zhangsan',age:18})
const addAge=()=>{
  state.age++
  console.log(state)
}
</script>

<template>
<p>姓名：{{ state.name }}</p>
<p>姓名：{{ state.age }}</p>
<button @click="addAge()">一年又一年</button>
</template>

<style>


</style>